package com.ljx.funchat.chat.controller;


import com.ljx.funchat.chat.domain.vo.req.GroupMemberPageReq;
import com.ljx.funchat.chat.domain.vo.resp.GroupMemberPageResp;
import com.ljx.funchat.chat.service.IRoomService;
import com.ljx.funchat.common.domain.vo.req.CursorPageBaseReq;
import com.ljx.funchat.common.domain.vo.resp.ApiResult;
import com.ljx.funchat.common.domain.vo.resp.CursorPageBaseResp;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LiJunXi
 * @since 2024-02-14
 */
@ApiOperation("聊天房间接口")
@RestController
@RequestMapping("/chat/room")
public class RoomController {

    @Autowired
    private IRoomService roomService;

    @ApiOperation("群成员列表")
    @GetMapping("/public/member/page")
    public ApiResult<CursorPageBaseResp<GroupMemberPageResp>> getMemberPage(@Valid GroupMemberPageReq req){
        return ApiResult.success(roomService.getMemberPage(req));
    }


}

